package com.pes.arcww.service;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.pes.arcww.dao.TopicsDAO;
import com.pes.arcww.form.Topics;


@Service("topicService")
public class TopicsServiceImpl implements TopicsService {
	
	@Autowired
	private TopicsDAO topicDAO;
	
	@Transactional
	public void addTopic(Topics topic) {
		topicDAO.addTopic(topic);
	}

	@Transactional
	public Collection<Topics> listTopics(String filter, String value) {
		return topicDAO.listTopics(filter, value);
	}

	@Transactional
	public Topics getTopic(Integer id) {
		return topicDAO.getTopic(id);
	}

	@Transactional
	public void removeTopic(Integer id) {
		topicDAO.removeTopic(id);
	}

	@Transactional
	public void updateTopic(Topics topic) {
		topicDAO.updateTopic(topic);
	}

}
